package com.zj.web.bean;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.web.multipart.MultipartFile;

import java.io.Serializable;
import java.math.BigDecimal;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class ProductDTO implements Serializable {
    @JsonSerialize(using = ToStringSerializer.class)
    private Long productId; //商品ID
    private Long categoryId; //分类ID
    private String productName; //商品名称
    private String description; //商品描述
    private Double price; //当前价格
    private Double originalPrice; //原价
    private Integer productStatus; //状态(0-下架 1-上架)
    private String productImg; //商品图片

    @JsonIgnore  //不参与json序列化
    private MultipartFile productImgFile; //商品图片文件


    private String categoryName;
}
